1. Field of the Invention
The present invention relates to a display method and system. More specifically, a method is disclosed providing for the rapid display of waveform data in a circuit simulation system.
2. Description of the Prior Art
More and more, designers of complex electronics are turning to circuit simulation systems to design, test and debug the circuits they are creating. Using simulators over the physical circuits themselves provides for greater rapidity and flexibility in design changes, and for significant savings in both cost and time during the design cycle.
To xe2x80x9clayoutxe2x80x9d their circuits, hardware designers turn to a specialized software, termed hardware development language (HDL), such as Verilog or VHDL, to code the circuit design into a machine-readable format that can be executed by a simulator to generate simulation data. This HDL code may also be parsed to graphically present on a display system the actual circuit layout.
When debugging, circuit designers look through the circuit simulation data generated by the simulator, and compare simulated line signals against desired results. Signals that are not behaving as desired indicate bugs in the HDL code, and hence in the circuit design. Such simulation data is generally presented by a computer on a display. Please refer to FIG. 1. FIG. 1 illustrates simulated waveform results 18a being presented on a monitor 18 by an HDL design system 10. The HDL design system 10 is a computer system, typically a personal computer (PC), though minicomputers and mainframes are also frequently used. The exact computational platform is relatively unimportant, the difference being one merely of computational power, and hence speed. The computer system 10 will typically include an editor 12 that enables a user to modify HDL source code 12a, and a simulator 14 which uses the HDL source code 12a to generate simulation data 14a, essentially xe2x80x9crunningxe2x80x9d the circuit coded by the HDL source code 12a for a specific xe2x80x9ctimexe2x80x9d and storing the results as simulation data 14a. The simulation data 14a typically holds the state of all circuit elements throughout the simulated run time. A display system 16 is then used to present the simulation data 14a to the user on a monitor 18, as well as using the HDL source code 12a to present a graphical illustration of the circuit. As shown on the monitor 18, the circuit simulation data 14a is typically presented in the form of waveforms 18a, each waveform 18a showing the evolution of a state of a circuit element over time. The state of a circuit element is a signal, circuit elements influencing each other by exchanging signals by way of conductive lines, and accepting signals from an outside source. Hence, the simulation data 14a is simply a vast array of signals and how these signals change with time. User I/O devices 10a permit the user to control the HDL design system 10.
When debugging a circuit, it is frequently necessary to look at various sections, in terms of time, of the simulation data 14a. The display system 16 thus permits the user to scroll, zoom in and zoom out the waveforms 18a. Consider, for example, FIGS. 2a through 2c, with reference to FIG. 1. FIGS. 2a through 2c illustrate zooming out on a waveform for a signal sf. Signal sf may, for example, represent the output state of an AND gate, or be one of several input lines into a multiplexer. In any event, within FIG. 2A, the display system 16 presents a waveform 20a for the signal sf over a certain span of simulated time, the range of time indicated by a timeline 21a. Simulated time increases from left to right on the display 18, while changes to the signal sf are indicated by corresponding vertical changes in the waveform 20a. A user instructs the display system 16 to zoom out on the waveform 20a, and the result of this action is presented in FIG. 2B as a waveform 20b, and a corresponding timeline 21b. In FIG. 2B, dotted lines indicate the portion of the waveform 20a visible in FIG. 2A. After zooming out, a greater extent (in terms of simulated time) of the signal sf is present on the display 18 in the form of waveform 20b. However, a greater amount of time must be squeezed into the same horizontal width of the display 18, and waveform 20b is thus correspondingly diminished along the horizontal axis of the display 18. Generally, when displaying a signal, zooming in or zooming out of the corresponding waveform will leave the scaling of the vertical axis unchanged. Another zoom out procedure is performed on waveform 20b, resulting in a new waveform 20c presented on the display 18, as shown in FIG. 2C, and a new timeline 21c. Dotted lines in FIG. 2C illustrate the extent of the signal sf present as waveform 20b in FIG. 2B. Again, a greater amount of time is presented along the same horizontal width of the display 18, so that transitions in the waveform 20c are closer together than the same transitions in waveforms 20a and 20b. 
The display 18 has a fixed resolution and eventually, as the user continues to zoom out, transitions in the waveform will begin to exceed the resolution of the display 18. Please refer to FIG. 3 for an example of this. FIG. 3 is a detailed view of the display 18 when attempting to display a highly compressed waveform 23. As is well known in the art of display technologies, the display 18 is typically composed of a plurality of pixels 18p, all of which have a uniform width and height. It is convenient to think of the pixels 18p as squares, though this is not necessarily the case. Nevertheless, the pixels 18p all have a width 18w, and thus, in terms of the waveform 23, span a region of simulated time. To draw the waveform 23, the display system 16 determines which pixels 18p lie in the path of the waveform 23, and then colors these pixels 18p accordingly. For example, all pixels 18p may be initially colored black. When the waveform 23 is computed and drawn, all pixels 18p in the path of the waveform 23 are colored white. A white waveform 23 should thus appear on the display 18 against a black background. However, the transition frequency of the waveform 23 exceeds the width 18w of the pixels 18p. Hence, all pixels 18p within a block 18b will be colored white. In effect, the user is not presented the waveform 23, but rather a solidly filled rectangle of white. Worse still, though, is that generating this solid rectangle 18b is relatively slow. The waveform 23 is clearly made up of a plurality of horizontal line segments 23h and vertical line segments 23v, each having a start-point and an end-point. To draw the waveform 23, the display system 16 repetitively feeds the start and end point pairs to a line drawing algorithm 16L. Such line drawing algorithms 16L are well known in the art of computer display technology, and simply draw a line on the display 18 that connects the start point pixel 18p to the end point pixel 18p, coloring all such intermediate pixels 18p to a desired color, such as white. The line drawing algorithm 16L may be implemented in either hardware or software. When drawing the waveform 23, unnecessary calls are made to the line drawing algorithm 16L to draw pixels 18p that have already been colored by a previous transition of the waveform 23. For example, in a column 23c of pixels 18p within the block 18b, as many as seven calls to the line drawing algorithm 16L are made to color the same column 23c of pixels 18p, due to the seven vertical lines 23v of the waveform 23 that lie within the column 23c. This significantly slows the display speeds of the HDL design system 10 when presenting the waveform 23.
It is therefore a primary objective of this invention to provide a method and associated system that permits the rapid displaying of waveform data.
Briefly summarized, the preferred embodiment of the present invention discloses displaying waveform data on a display of a computer system. The waveform data contains waveform signals, each waveform signal having at least one transition event. The waveform data is subdivided into data blocks. For each waveform signal, at least one indexing element is provided, each indexing element corresponding to a time range of the waveform data. Each indexing element has a pointer into at least one of the data blocks within which transition events for the waveform signal, in the time range corresponding to the indexing element, are stored. Each indexing element also has a maximum interval value. The maximum interval value indicates the maximum amount of time spanned between transition events of the waveform signal within the time range corresponding to the indexing element. A minimum time resolution within which transition events of the waveform signal may be adequately resolved on the display is computed. For an indexing element having a maximum interval value that exceeds the minimum time resolution, the pointer of the indexing element is used to access and draw transition events for the waveform signal that are within the time range of the indexing element. For an indexing element having a maximum interval value that is less than the minimum time resolution, a predetermined image in place of transition events for the waveform signal is drawn.
It is an advantage of the present invention that by providing the indexing elements with their respective maximum interval values, it is possible to quickly eliminate blocks of waveform data that are effectively not displayable because they exceed the resolution capabilities of the display. Consequently, rather than wasting computational resources and time displaying this data, a predetermined image may be drawn instead. Additionally, flags may be added to the indexing elements, indicating the presence of special signal conditions that may require additional recognition.
These and other objectives of the present invention will no doubt become obvious to those of ordinary skill in the art after reading the following detailed description of the preferred embodiment, which is illustrated in the various figures and drawings.